package com.daedalus.Gui.other.Smiley;

import javax.swing.JPanel;

import java.awt.Color;
import java.awt.Graphics;

public class drawSmiley extends JPanel{
	
	public boolean syri;
	public boolean happy;
	
	public drawSmiley(boolean s,boolean h){
		syri=s;
		happy=h;
	}
	public void paintComponent(Graphics g){
		super.paintComponent(g);
	//	g.drawOval(0, 0, this.getWidth(), this.getWidth());
		g.setColor(Color.yellow);
		g.fillOval(0, 0, this.getWidth(), this.getWidth());
		g.setColor(Color.black);
		g.fillOval(this.getWidth()/3-this.getWidth()/7, this.getWidth()/3-this.getWidth()/7+this.getWidth()/21, this.getWidth()/10, this.getWidth()/10);
		g.fillOval(this.getWidth()-this.getWidth()/3, this.getWidth()/3-this.getWidth()/7+this.getWidth()/21, this.getWidth()/10, this.getWidth()/10);
	
	if (happy){
		g.setColor(Color.black);
		g.fillArc(this.getWidth()/4, this.getWidth()/4+this.getWidth()/8, this.getWidth()/2, this.getWidth()/2, 180, 180);
		g.setColor(Color.yellow);
		g.fillArc(this.getWidth()/4-this.getWidth()/30, this.getWidth()/2-this.getWidth()/10, this.getWidth()/2+this.getWidth()/20, this.getWidth()/4+this.getWidth()/10, 180, 180);
	}
	else{
		g.setColor(Color.black);
		g.fillArc(this.getWidth()/4, this.getWidth()/4+this.getWidth()/8+this.getWidth()/6, this.getWidth()/2, this.getWidth()/2, -180, -180);
		g.setColor(Color.yellow);
		g.fillArc(this.getWidth()/4-this.getWidth()/30, this.getWidth()/2+this.getWidth()/8, this.getWidth()/2+this.getWidth()/20, this.getWidth()/4+this.getWidth()/10, -180, -180);
	
	}
		if(syri){
			g.setColor(Color.yellow);
			g.fillArc(this.getWidth()/3-this.getWidth()/6, this.getWidth()/3-this.getWidth()/6, this.getWidth()/7, this.getWidth()/7, 180, 180);
		}
	}
}
